<template>
  <div>
      <p>我是一个菜鸡。。。</p>
      <p>用户余额：{{$store.state.money}}</p>
      <button @click="moneyUp">充5元</button>
  </div>
</template>

<script>
import {myRecharge} from '../store/mutation-types'
export default {
    methods: {
        moneyUp() {
            // 充5元
            this.$store.commit(myRecharge, 5)
        }
    }
}
</script>

<style>

</style>